<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IDE usage recommendations</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Test">
<link rel="up" href="../practical_usage_recommendations.html" title="Practical usage recommendations">
<link rel="prev" href="general.html" title="General">
<link rel="next" href="command_line_usage_recommendatio.html" title="Command line usage recommendations">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="general.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="command_line_usage_recommendatio.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_test.practical_usage_recommendations.ide_usage_recommendations"></a><a class="link" href="ide_usage_recommendations.html" title="IDE usage recommendations">IDE
      usage recommendations</a>
</h3></div></div></div>
<p>
        This recommendation is shown using Microsoft Visual Studio as an example,
        but you can apply similar steps in different IDEs.
      </p>
<h5>
<a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.h0"></a>
        <span class="phrase"><a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.use_custom_build_step_to_automat"></a></span><a class="link" href="ide_usage_recommendations.html#boost_test.practical_usage_recommendations.ide_usage_recommendations.use_custom_build_step_to_automat">Use
        custom build step to automatically start test program after compilation</a>
      </h5>
<p>
        I found it most convenient to put test program execution as a post-build
        step in compilation. To do so use project property page:
      </p>
<p>
        <span class="inlinemediaobject"><img src="../../images/post_build_event.jpg"></span>
      </p>
<p>
        Full command you need in "Command Line" field is:
      </p>
<pre class="programlisting">"$(TargetDir)$(TargetName).exe" --<a class="link" href="../utf_reference/rt_param_reference/result_code.html" title="result_code"><code class="computeroutput"><span class="identifier">result_code</span></code></a>=no --<a class="link" href="../utf_reference/rt_param_reference/report_level.html" title="report_level"><code class="computeroutput"><span class="identifier">report_level</span></code></a>=no
</pre>
<p>
        Note that both report level and result code are suppressed. This way the
        only output you may see from this command are possible runtime errors. But
        the best part is that you could jump through these errors using usual keyboard
        shortcuts/mouse clicks you use for compilation error analysis:
      </p>
<p>
        <span class="inlinemediaobject"><img src="../../images/post_build_out.jpg"></span>
      </p>
<h5>
<a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.h1"></a>
        <span class="phrase"><a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.if_you_got_fatal_exception_somew"></a></span><a class="link" href="ide_usage_recommendations.html#boost_test.practical_usage_recommendations.ide_usage_recommendations.if_you_got_fatal_exception_somew">If
        you got fatal exception somewhere within test case, make debugger break at
        the point the failure by adding extra command line argument</a>
      </h5>
<p>
        If you got "memory access violation" message (or any other message
        indication fatal or system error) when you run you test, to get more information
        of error location add
      </p>
<pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/catch_system.html" title="catch_system_errors">catch_system_error</a>=no
</pre>
<p>
        to the test run command line:
      </p>
<p>
        <span class="inlinemediaobject"><img src="../../images/run_args.jpg"></span>
      </p>
<p>
        Now run the test again under debugger and it will break at the point of failure.
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="general.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="command_line_usage_recommendatio.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
